<%@ page import="com.onlineOrder.bean.userList" %>
<%@ page import="com.onlineOrder.webAction.userServlet" %><%--
  Created by IntelliJ IDEA.
  User: 12296
  Date: 2022/3/7
  Time: 21:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户详情</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css">
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="./style/index.css">
    <link rel="stylesheet" href="./style/dialog.css">

</head>
<body>
<% userList userDetail = (userList) request.getAttribute("userList"); %>
<div class="container row=10">
    <div class="app-container">
        <button class="open-dialog-button"
                style="position: absolute; top: 1px; right: 275px;background-color: #2a3f54; border-radius: 10px">编辑信息
        </button>
        <div class="dialog" style="display:none">
            <div class="dialog-main" style="position: absolute;left: 330px;top: 120px">
                <div class="dialog-head">
                    <button class="dialog-close-button icon-botton" style="background-color: #2a3f54">x</button>
                    <br>
                    <center>
                        <form action="<%=request.getContextPath()%>/userModify?userID=<%=userDetail.getUserId()%>"
                              method="post">
                            <label>新昵称：<input type="text" value="<%=userDetail.getUserName()%>"
                                              name="newUserName"></label><br><br>
                            <label>新密码：<input type="text" value="<%=userDetail.getPassword()%>"
                                              name="newUserPwd"></label><br><br>
                            <label>手机号：<input type="text" value="<%=userDetail.getPhone()%>"
                                              name="newUserPhone"></label><br><br>
                            <label>新地址：<input type="text" value="<%=userDetail.getAddress()%>"
                                              name="newUserAddress"></label><br><br>
                            <input type="submit" value="确认" class="open-dialog-button"
                                   style="background-color: #2a3f54">
                        </form>
                    </center>
                </div>
            </div>
        </div>
    </div>


    <table class="table table-striped table-hover">
        <tbody>
        <tr>
            <td>用户账号：</td>
            <td><%=userDetail.getUserId()%>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>用户昵称：</td>
            <td><%=userDetail.getUserName()%>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>用户密码：</td>
            <td><%=userDetail.getPassword()%>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>真实姓名：</td>
            <td><%=userDetail.getName()%>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>手机号：</td>
            <td><%=userDetail.getPhone()%>
            </td>
            <td></td>
        </tr>

        <tr>
            <td>性别：</td>
            <td><%=userDetail.getSex()%>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>收餐地址：</td>
            <td><%=userServlet.userAddress = userDetail.getAddress()%>
            </td>
            <td></td>
        </tr>
        </tbody>
    </table>
    <script src="./style/main.js"></script>
</div>
</body>
</html>
